import Vue from 'vue'
import { requst } from '@/http/request.js'
import { getUInfo, timestampToDateFormat } from '@/util/util.js'


/* ********** 火山引擎(豆包AI)生产环境接口 ********** */
Vue.prototype.$arkAnalyze2 = (prms) => {
	return requst('/api/index/completions', prms, 'GET', { 'content-type': 'application/x-www-form-urlencoded' })
}

// 登录 
Vue.prototype.$login = (prms) => {
	return requst('/api/user/login', prms, 'POST', { 'content-type': 'application/x-www-form-urlencoded' })
}

// 下单
Vue.prototype.$create_order = (prms) => {
	return requst('/api/new_orders/add', prms, 'POST', { 'content-type': 'application/x-www-form-urlencoded' })
}


// 获取验证码
Vue.prototype.$getSmsCode = (prms) => {
	return requst('/api/sms/send', prms, 'POST')
}

// 查询运单  
Vue.prototype.$getOrder = (prms) => {
	return requst('/api/user/getOrder', prms, 'GET', { 'content-type': 'application/x-www-form-urlencoded' })
}

// 异常原因 
Vue.prototype.$getReason = (prms) => {
	return requst('/api/index/getReason', prms, 'GET', { 'content-type': 'application/x-www-form-urlencoded' })
}

// 上报异常
Vue.prototype.$uploadAbnormal = (prms) => {
	return requst('/api/user/abnormal', prms, 'POST', { 'content-type': 'application/x-www-form-urlencoded' })
}

// 历史记录 
Vue.prototype.$getAbnormal = (prms) => {
	return requst('/api/user/getAbnormal', prms, 'GET', { 'content-type': 'application/x-www-form-urlencoded' })
}

// 删除异常记录 
Vue.prototype.$delAbnormal = (prms) => {
	return requst('/api/user/delAbnormal', prms, 'GET', { 'content-type': 'application/x-www-form-urlencoded' })
}

// 上传回单 
Vue.prototype.$uploadHd = (prms) => {
	return requst('/api/user/receipt', prms, 'POST', { 'content-type': 'application/x-www-form-urlencoded' })
}

// 回单列表 
Vue.prototype.$getHdList = (prms) => {
	return requst('/api/user/getReceipt', prms, 'GET', { 'content-type': 'application/x-www-form-urlencoded' })
}

// 删除回单 
Vue.prototype.$delReceipt = (prms) => {
	return requst('/api/user/delReceipt', prms, 'GET', { 'content-type': 'application/x-www-form-urlencoded' })
}

// 数据统计 
Vue.prototype.$getStatistics = (prms) => {
	return requst('/api/user/statistics', prms, 'GET', { 'content-type': 'application/x-www-form-urlencoded' })
}

// 获取回单详情 
Vue.prototype.$getReceipt = (prms) => {
	return requst('/api/index/getReceipt', prms, 'GET', { 'content-type': 'application/x-www-form-urlencoded' })
}